<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Cool shop',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),
	'language'=>'zh_cn',
	'modules'=>array(
		'front',
		'manage',
		'pay',
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'123',
			'ipFilters'=>array('127.0.0.1','::1'),
		),
			'srbac' => array(
                    'userclass'=>'User', //可选,默认是 User
                     'userid'=>'id', //可选,默认是 userid
                     'username'=>'username', //可选，默认是 username
                     'debug'=>false, //可选,默认是 false
                      'pageSize'=>10, //可选，默认是 15
                      'superUser' =>'Authority', //可选，默认是 Authorizer
                       'css'=>'srbac.css', //可选，默认是 srbac.css
                       'layout'=>
                        'application.views.layouts.main', //可选,默认是
                         'notAuthorizedView'=>
                                 'srbac.views.authitem.unauthorized',
                        'alwaysAllowed'=>array(    
		                        'SiteLogin','SiteLogout','SiteIndex','SiteAdmin',
		                         'SiteError', 'SiteContact'),
                          'userActions'=>array('Show','View','List'),//可选,默认是空数组
                          'listBoxNumberOfLines' => 15, //可选,默认是10
                          'imagesPath' => 'srbac.images', //可选,默认是 srbac.images
                          'imagesPack'=>'tango', //可选,默认是 noia
                          'iconText'=>true, //可选,默认是 false
                           'header'=>'srbac.views.authitem.header', //可选,默认是
                           // srbac.views.authitem.header, 必须是一个存在的路径别名
                           'footer'=>'srbac.views.authitem.footer', //可选,默认是
                           // srbac.views.authitem.footer, 必须是一个存在的路径别名
                          'showHeader'=>true, //可选,默认是false
                             'alwaysAllowedPath'=>'srbac.components', 
		),
	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'class'=>'WebUser',
			'allowAutoLogin'=>true,
		),
		'urlManager'=>array(
				'urlFormat'=>'path',
				'showScriptName'=>false
		),
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=coolshop;port=30067',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => 'root@mysql123',
			'charset' => 'utf8',
			'schemaCachingDuration' => 10,
		),
		'errorHandler'=>array(
			'errorAction'=>'site/error',
		),
		'authManager'=>array(
				     'class'=>'CDbAuthManager',
				     'connectionID'=>'db',
				     'itemTable'=>'auth_items',
				     'assignmentTable'=>'auth_assignment',
				     'itemChildTable'=>'auth_itemchild'
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning,info',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),
	'params'=>array(
		'adminEmail'=>'cquptwhc@gmail.com',
	),
);